package com.carassistant.beta.common.dialog;
  
import android.content.Context;
import android.graphics.Typeface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckedTextView;

import com.carassistant.beta.R;

public class SimgleChoiceAdapter extends BaseAdapter{
	private Context context; 
	private CharSequence[] texts;
	private boolean font;
	public SimgleChoiceAdapter(Context context, CharSequence[] texts,boolean font){
		this.context = context; 
		this.texts = texts;
		this.font = font;
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return texts.length;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if (convertView == null) {
			convertView = LayoutInflater.from(context).inflate(R.layout.single_choice_item, null);
		} 
		CheckedTextView tv = (CheckedTextView) convertView.findViewById(android.R.id.text1);
		tv.setText(texts[position]); 

		return convertView;
	}

}
